The present invention relates generally to packet transmission in a telecommunications network, and in particular, to a method for transmission of packets of data employing redundancy bits for error detection and correction.
With the advent of the Internet and other data communications, the need for packet switching has grown tremendously. With packet switching, messages that are to be delivered between two parties are divided into discrete portions called packets and then each packet is transmitted independently. When the packets arrive at the destination, the packets are compiled into the original message. Many protocols for data communications and Internet connection use packet transmission technologies, including TCP/IP and X.25.
As in other communication systems, noise is a problem for transmission of packets. In particular, spiky noise or noise of a short duration may be a problem in a packet transmission system. To detect errors caused by spiky noise, some packet transmission systems use a cyclic redundancy check (CRC) code for detecting errors in transmitted packets. More specifically, a CRC code is computed by a transmitter and appended to a packet for transmission. A receiver of the packet recomputes an expected CRC and compares it to the received CRC to determine if there were errors in transmission. Using the CRC in this capacity limits the ability to detect errors and make the packet transmission system robust. More specifically, error correction is not accomplished with the CRC and only errors associated with the single packet are detected based on the CRC.
Therefore, a need exists for a more robust method of detecting and correcting errors in packet transmission.
In accordance with the present invention, a method is provided for transmission of data packets. According to the method, a check word is composed for each packet of a sequence of packets. Preferably, the check word is a Hamming code of a predetermined length that is selected in a manner to detect and correct bit errors in the packets. After determining a check word for each packet, a transmission packet corresponding to each packet of the sequence of packets is composed. Each transmission packet includes the packet data as well as two check words. The first check word corresponds to a check word for the packet that precedes the current packet in the sequence of packets. The second check word corresponds to a check word for the packet that follows the current packet in the sequence of packets. In other words, each transmission packet contains a check word for the adjacent, prior packet in the sequence and a check word for the adjacent, subsequent packet in the sequence. The transmission packets form a sequence corresponding to the sequence of packets. The sequence of transmission packets is transmitted over a communications channel.
The sequence of transmission packets are sent over a communications channel and received as a sequence of received transmission packets. The received transmission packets include a first check word and a second check word, both corresponding to the first and second check words, respectively, from the original transmission packets. As the transmission packets are received in sequence, the received check words, which relate to packets that are separately received, are compared with the corresponding packets to determine if there were errors in transmission. More specifically, the packet portion of a received transmission packet is compared with a second check word of an adjacent prior received transmission packet in the sequence. Based upon the comparison, errors are detected and preferably corrected. Similarly, a first check word of a received transmission packet is compared with a packet portion of an adjacent prior received transmission packet in the sequence. Based upon the comparison, errors in transmission are detected and preferably corrected. Most preferably, rather than include a sequence number indicating the order of the packets, the transmission packets use the check word to verify the sequence in which the packets are received. Since each check word is transmitted twice, that is, before its corresponding data packet and after its corresponding data packet, errors that are short in duration are readily detected.
Additionally, the size of the check word is varied dynamically depending upon the importance of the data being transmitted and any perceived characteristics of the communications channel. In particular, the size of the check word is increased for noisy channels and decreased for channels with less noise. The noise level of a channel is determined by sending a plurality of sample messages and determining a noise level based on the error rate associated with the sample messages. The noise level is also determined by a number of retransmission packets requested by a receiver. And, a receiver may transmit an adjustment indication to a transmitter to indicate that the check word should be increased or decreased for noisier and quieter channels, respectively.